package com.bdqn.tour.service.impl;

import com.bdqn.tour.dao.HzyOrdersDao;
import com.bdqn.tour.dao.impl.HzyOrdersDaoImpl;
import com.bdqn.tour.pojo.HzyHotel;
import com.bdqn.tour.pojo.HzyOrder;
import com.bdqn.tour.pojo.HzyScenicSpot;
import com.bdqn.tour.pojo.HzyTickets;
import com.bdqn.tour.service.HzyOrdersService;

import java.util.List;

public class HzyOrdersServiceImpl implements HzyOrdersService {
    HzyOrdersDao ordersDao = new HzyOrdersDaoImpl();

    @Override
    public List<HzyOrder> getAllHotelOrders() {
        return ordersDao.getAllHotelOrders();
    }

    @Override
    public List<HzyOrder> getAllScenicOrders() {
        return ordersDao.getAllScenicOrders();
    }

    @Override
    public List<HzyOrder> getAllTicketOrders() {
        return ordersDao.getAllTicketOrders();
    }

    @Override
    public List<HzyOrder> getAllOrders() {
        return ordersDao.getAllOrders();
    }

    public boolean deleteHotelOrder(Long id) {
        return ordersDao.deleteHotelOrder(id);
    }

    public boolean deleteScenicOrder(Long id) {
        return ordersDao.deleteScenicOrder(id);
    }

    public boolean deleteTicketOrder(Long id) {
        return ordersDao.deleteTicketOrder(id);
    }

    public boolean updateHotelOrder(HzyHotel hotel) {
        return ordersDao.updateHotelOrder(hotel);
    }

    public boolean updateScenicOrder(HzyScenicSpot scenicSpot) {
        return ordersDao.updateScenicOrder(scenicSpot);
    }

    public boolean updateTicketOrder(HzyTickets ticket) {
        return ordersDao.updateTicketOrder(ticket);
    }

    @Override
    public List<HzyOrder> getRecentOrders() {
        return ordersDao.getRecentOrders();
    }

    @Override
    public boolean updateHotelPayStatus(String orderId, String status) {
        return ordersDao.updateHotelPayStatus(orderId, status);
    }

    @Override
    public int getStatusCount() {
        return ordersDao.getStatusCount();
    }
}
